Native code is a type of code compiled for direct execution by a given type of central processing unit (CPU). For example, a compiler reads computer programmed instructions written in a computer programming language (such as FORTRAN) to generate native code that is directly executable by a brand-specific CPU. Unfortunately, native code (i.e., it is non-portable) compiled for one type of CPU cannot be executed by another type of CPU. For each type of CPU, the computer programmed instructions must be recompiled to generate native code for execution by or on that type of CPU.
Non-native code, on the other hand, is not directly executed by a CPU. An intermediate program is used to execute non-native code. In turn, the intermediate program is directly executed by the CPU. In this sense, the CPU indirectly executes non-native code. An example of an intermediate program is a Java™ virtual machine (supplied by Sun Microsystems of California, USA) which is used for directly executing computer programmed instructions written in Java™. Once a CPU directly executes the virtual machine, then the executing virtual machine directly executes non-native code. Functionally, the virtual machine is a type of translator for reading non-native code and for generating native code for direct execution by the CPU. The advantage of non-native code is that it can be indirectly executed by many different types of CPUs provided that each type of CPU is executing a corresponding virtual machine designed to be used with that specific type of CPU. A disadvantage associated with executing non-native code is that the time required to execute non-native code is greater than the time required to execute a corresponding unit of native code.
Accordingly, a system that addresses, at least in part, these and other shortcomings is desirable.